<!--
 * @Descripttion: 
 * @version: 
 * @Author: yuanliutech
 * @Date: 2022-12-06 16:57:41
 * @LastEditors: yuanliutech@lwj
 * @LastEditTime: 2022-12-21 18:20:32
-->
<template>
  <div>
    <el-dialog title="组织详情" :visible.sync="dialogVisible" width="600px" :show-close="false"
      :close-on-click-modal="false" :append-to-body="true">
      <!-- <el-descriptions :column="2" border>
        <el-descriptions-item label="单位名称">{{
          detailOrgInfo.orgName
        }}</el-descriptions-item>
        <el-descriptions-item label="创建时间">{{
          detailOrgInfo.createTime
        }}</el-descriptions-item>
        <el-descriptions-item label="负责人姓名">{{
          detailOrgInfo.username
        }}</el-descriptions-item>
        <el-descriptions-item label="负责人手机">{{
          detailOrgInfo.mobile
        }}</el-descriptions-item>
        <el-descriptions-item label="单位编号" :span="2"
          >{{ detailOrgInfo.orgCode }}</el-descriptions-item
        >
        <el-descriptions-item label="地址" :span="2"
          >{{ detailOrgInfo.province }}{{ detailOrgInfo.city
          }}{{ detailOrgInfo.area }}{{ detailOrgInfo.street
          }}{{ detailOrgInfo.address }}</el-descriptions-item
        >
      </el-descriptions> -->
      <el-row>
        <el-col :span="12">
          <div class="div_box">
            组织名称：<span>{{ detailOrgInfo.orgName }}</span>
          </div>
        </el-col>
        <el-col :span="12">
          <!-- <div class="div_box">
            所属国家：<span>{{ detailOrgInfo.homeCountry }}</span>
          </div> -->
          <div class="div_box">
            监管等级：<span>
              <span v-if="detailOrgInfo.grade==1">一级消防安全重点单位</span>
            <span v-else-if="detailOrgInfo.grade==2">二级消防安全重点单位</span>
            <span v-else-if="detailOrgInfo.grade==3">三级消防安全重点单位</span>
            <span v-else-if="detailOrgInfo.grade==4">非消防安全重点单位</span>
             </span>
          </div>
        </el-col>
      </el-row>

      <el-row>
        <el-col :span="12">
          
          <div class="div_box">
            单位监管类型：
            <span v-if="detailOrgInfo.flatType==1">九小单位</span>
            <span v-else-if="detailOrgInfo.flatType==2">高危单位</span>
            <span v-else-if="detailOrgInfo.flatType==3">重点单位</span>
            <span v-else-if="detailOrgInfo.flatType==4">一般单位</span>
            <span v-else-if="detailOrgInfo.flatType==5">高层建筑</span>
            <span v-else-if="detailOrgInfo.flatType==6">其他单位</span>
            <span v-else-if="detailOrgInfo.flatType==7">超大综合体</span>
            <span v-else-if="detailOrgInfo.flatType==8">化工企业</span>
            <span v-else-if="detailOrgInfo.flatType==9">地下建筑</span>
            <!-- <span v-else-if="detailOrgInfo.flatType==10">地窖单位</span> -->
          </div>
        </el-col>
        <el-col :span="12">
          <div class="div_box">
            单位性质：<span>
              <span v-if="detailOrgInfo.nature==1">国有企业</span>
            <span v-else-if="detailOrgInfo.nature==2">集体企业</span>
            <span v-else-if="detailOrgInfo.nature==3">民营企业</span>
            <span v-else-if="detailOrgInfo.nature==4">个体工商户</span>
            <span v-else-if="detailOrgInfo.nature==5">中外合资企业</span>
            <span v-else-if="detailOrgInfo.nature==6">外商独资企业</span>
            <span v-else-if="detailOrgInfo.nature==7">股份制企业</span>
            <span v-else-if="detailOrgInfo.nature==8">事业单位</span>
            <span v-else-if="detailOrgInfo.nature==9">国家单位</span>
            <span v-else-if="detailOrgInfo.nature==10">照明场所</span>
            <span v-else-if="detailOrgInfo.nature==11">其他</span>
             </span>
          </div>
        </el-col>
      </el-row>

      <el-row>
        <el-col :span="12">
          <div class="div_box">
            单位类别：<span>{{ detailOrgInfo.category }}
              <span v-if="detailOrgInfo.category==1">医院</span>
            <span v-else-if="detailOrgInfo.category==2">科研单位</span>
            <span v-else-if="detailOrgInfo.category==3">住宅</span>
            <span v-else-if="detailOrgInfo.category==4">体育场</span>
            <span v-else-if="detailOrgInfo.category==5">工厂</span>
            <span v-else-if="detailOrgInfo.category==6">学校</span>
            <span v-else-if="detailOrgInfo.category==7">养老院</span>
            <span v-else-if="detailOrgInfo.category==8">政府机构</span>
            <span v-else-if="detailOrgInfo.category==9">车站</span>
            <span v-else-if="detailOrgInfo.category==10">码头</span>
            <span v-else-if="detailOrgInfo.category==11">企业</span>
            <span v-else-if="detailOrgInfo.category==12">商店</span>
            <span v-else-if="detailOrgInfo.category==13">宾馆</span>
            <span v-else-if="detailOrgInfo.category==14">其他</span>
            <span v-else-if="detailOrgInfo.category==15">非营利性机构</span>
            </span>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="div_box">
            单位编号：<span>{{ detailOrgInfo.orgCode }}</span>
          </div>
        </el-col>
      </el-row>

      <!-- <el-row>
        <el-col :span="12">
          <div class="div_box">
            负责人姓名：<span>{{ detailOrgInfo.username }}</span>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="div_box">
            负责人手机：<span>{{ detailOrgInfo.mobile }}</span>
          </div>
        </el-col>
      </el-row> -->

      <el-row>
        <el-col :span="12">
          <div class="div_box">
            社区：<span>{{ detailOrgInfo.community }}</span>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="div_box">
            创建时间：<span>{{ detailOrgInfo.createTime }}</span>
          </div>
        </el-col>
      </el-row>

      <div class="div_box">
        详细地址：<span>{{ detailOrgInfo.province }}{{ detailOrgInfo.city
        }}{{ detailOrgInfo.area }}{{ detailOrgInfo.street
        }}{{ detailOrgInfo.address }}</span>
      </div>

      <!-- <div class="div_box">
        社区：<span>{{ detailOrgInfo.community }}</span>
      </div> -->

      <el-row>
        <el-col :span="12">
          <div class="div_box">
            值班室电话：<span>{{ detailOrgInfo.telephone }}</span>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="div_box">
            施工单位：<span>{{ detailOrgInfo.construction }}</span>
          </div>
        </el-col>
      </el-row>

      <el-row>
        <el-col :span="12">
          <div class="div_box">
            法人姓名：<span>{{ detailOrgInfo.corporateName }}</span>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="div_box">
            法人身份证：<span>{{ detailOrgInfo.corporateIdCard }}</span>
          </div>
        </el-col>
      </el-row>

      <span slot="footer" class="dialog-footer">
        <el-button size="small" @click="closeDialog">关 闭</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
export default {
  props: ["detailOrgInfo"],
  data() {
    return {
      dialogVisible: false,
    };
  },
  watch: {
    // detailOrgInfo(val) {
    //   if (!val) return;
    //   this.editForm.id = val.id;
    //   this.editForm.orgName = val.orgName;
    //   this.editForm.region = [val.province, val.city, val.area];
    //   this.editForm.province = val.province;
    //   this.editForm.city = val.city;
    //   this.editForm.area = val.area;
    //   this.editForm.address = val.address;
    // },
  },
  methods: {
    // 点击关闭弹框
    closeDialog() {
      console.log(this.detailOrgInfo);
      this.dialogVisible = false;
    },
  },
};
</script>

<style lang="less" scoped>
@import url("../../../common.less");
span{
  color: @primaryFFFColor2;
}
// 内容
::v-deep .el-descriptions__body {
  background-color: @primaryHeaderBgcolor;
}
// 边框
::v-deep .el-descriptions-item__cell {
  border: 1px solid @primaryBorderColor !important;
}
// 标题
::v-deep .el-descriptions-item__label.is-bordered-label {
  background-color: @primaryHeaderBgcolor;
}
.div_box {
  height: 50px;
  // line-height: 30px;
  color: @primaryThemeTxtColor;
}
</style>
